import request from '@/utils/request'
import {HOST} from '@/constants'
import qs from 'qs'

export function getBankList(data) {
    return request({
        url: `${HOST}/bank/list`,
        method: 'get',
        params: data
    })
}

export function getBankToAuth(data) {
    return request({
        url: `${HOST}/bank/to-auth`,
        method: 'get',
        params: data
    })
}

export function getOneBank(data) {
    return request({
        url: `${HOST}/bank/one`,
        method: 'get',
        params: data
    })
}

export function getMyBank(data) {
    return request({
        url: `${HOST}/bank/my`,
        method: 'get',
        params: data
    })
}

export function authBank(data) {
    return request({
        url: `${HOST}/bank/auth`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function submitBank(data) {
    return request({
        url: `${HOST}/bank/submit`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function accessBank(data) {
    return request({
        url: `${HOST}/bank/access`,
        method: 'post',
        data: qs.stringify(data)
    })
}
